package com.hexacta.hrs.sandbox.tasks2.service;

import java.util.List;

import com.hexacta.hrs.sandbox.tasks2.data.CategoryDao;
import com.hexacta.hrs.sandbox.tasks2.model.Category;

public class CategoryServiceImpl implements CategoryService {

	private CategoryDao categoryDao;

	public List<Category> selectAllCategories() {

		return this.getCategoryDao().findAll();
	}

	public void setCategoryDao(CategoryDao categoryDao) {
		this.categoryDao = categoryDao;
	}

	public CategoryDao getCategoryDao() {
		return categoryDao;
	}

	public Category findCategoryByName(String selectedCategory) {

		return this.getCategoryDao().findByName(selectedCategory);
	}

	public Category findCategoryById(Long long1) {
		return this.getCategoryDao().findById(long1);
		
	}

}
